package value_object;

public class ResultVO extends VO {
	private double gain;

	public ResultVO() {
		super();
	}
	
	public ResultVO(int data_set_number, int grid_number, int track_number) {
		super(data_set_number, grid_number, track_number);
	}

	public double getGain() {
		return gain;
	}

	public void setGain(double gain) {
		this.gain = gain;
	}
	
	@Override
	public String toString() {
		if (gain == 0)
			return "";
		
		StringBuffer buffer = new StringBuffer();

		buffer.append(getData_set_number() + "(data-set-number)");
		buffer.append(" ");
		buffer.append(getGrid_number() + "(grid-number)");
		buffer.append(" ");
		buffer.append(getTrack_number() + "(track-number)");

		buffer.append("\n");
		
		buffer.append((long) gain + "(total gain)");
		
		buffer.append("\n");
		return buffer.toString();
	}
	
	public String toSimpleString() {
		if (gain == 0)
			return "";
		
		StringBuffer buffer = new StringBuffer();

		buffer.append(getData_set_number());
		buffer.append(" ");
		buffer.append(getGrid_number());
		buffer.append(" ");
		buffer.append(getTrack_number());

		buffer.append("\n");
		
		buffer.append((long) gain);
		
		buffer.append("\n");
		return buffer.toString();
	}
}
